import request from '@/utils/request'

// 查询店员列表
export function listClerk(query) {
  return request({
    url: '/work/shopclerk/list',
    method: 'get',
    params: query
  })
}

// 查询店员详细
export function getClerk(id) {
  return request({
    url: '/work/shopclerk/' + id,
    method: 'get'
  })
}

// 新增店员
export function addClerk(data) {
  return request({
    url: '/work/shopclerk/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改店员
export function updateClerk(data) {
  return request({
    url: '/work/shopclerk/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除店员
export function delClerk(id) {
  return request({
    url: '/work/shopclerk/delete-by-id',
    method: 'get',
    params: { id: id }
  })
}

export function delClerks(ids) {
  return request({
    url: '/work/shopclerk/delete-by-ids',
    method: 'get',
    params: { ids: ids }
  })
}



